Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Data Types


Polygon Structures

You use the gxPolygon structure to specify a single polygon contour composed of straight lines.

The gxPolygon structure is defined as follows:

struct gxPolygon {
   long           vectors;
   struct gxPoint vector[gxAnyNumber];
};
Field Description
vectors
The number of geometric points in the contour.
vector
The coordinates of the geometric points.
The array index gxAnyNumber indicates that the gxPolygon data structure is a variable-length structure--it can include any number of points.

The gxPolygons structure allows you to group multiple polygon contours together. You use this structure when specifying the geometry of a polygon shape.

The gxPolygons structure is defined as follows:

struct gxPolygons {
   long             contours;
   struct gxPolygon contour[gxAnyNumber];
};
Field Description
contours
The number of polygon contours.
contour
The polygon contours.
The array index gxAnyNumber indicates that the gxPolygons data structure is also a variable-length structure--it can include any number of gxPolygon structures.

Implementation Note
In version 1.0 of QuickDraw GX, a single polygon contour can have between 1 and 32,767 geometric points. The geometry of a polygon shape can have between 0 and 32,767 polygon contours. The total size of a polygon geometry may not exceed 2,147,483,647 bytes.
For more information about polygons and polygon shapes, see "Polygon Shapes" on page 2-22.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help